package javase2.day03;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class Demo10 {
	public static void main(String args[]) throws IOException{
		String file = "out.dat";
		OutputStream out = new FileOutputStream(file);
		out.write(65);
		out.write(66);
		out.write(67);
		out.write(68);
		out.write(88);
		out.close();
		
		IOUtils.print(file);
		InputStream in = new FileInputStream(file);
		int b;
		while((b=in.read())!=-1){
			System.out.println(b);
		}
		in.close();
	}
}
